package org.icosagon.core.character.traits;

import org.icosagon.core.Modifiable;
import java.util.Vector;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import org.icosagon.core.Definable;
import org.icosagon.core.magic.Effect;

/**
 *
 * @author Daniel Owens
 */
public class Feat extends Definable {
    private Vector<Effect> effects = new Vector<Effect>();
    @XmlElement(name="value")
    private Vector<Modifiable> prerequisites = new Vector<Modifiable>();
    private boolean spelltouched = false;

    private Feat() {}
    public Feat(String name) {
        this.setName(name);
    }
    
    public void addEffect(Effect effect) {
        this.effects.add(effect);
    }
    
    public void removeEffect(Effect effect) {
        this.effects.remove(effect);
    }
    
    public Vector<Effect> getEffects() {
        return this.effects;
    }

    public void setPrerequisites(Vector<Modifiable> prereq) {
        this.prerequisites = prereq;
    }

    public Vector<Modifiable> getPrerequisites() {
        return this.prerequisites;
    }

    public void addPrerequisite(Modifiable pre) {
        this.prerequisites.add(pre);
    }

    public void removePrerequisite(Modifiable pre) {
        this.prerequisites.remove(pre);
    }

    public void setSpelltouched(boolean value) {
        this.spelltouched = value;
    }

    public boolean getSpelltouched() {
        return this.spelltouched;
    }
}